﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YmtAuth.Domain
{
    
    
    /// <summary>
    /// 验证用户安全问题的返回码
    /// </summary>
    public class SecurityQuestionResponseCode
    {
        /// <summary>
        /// 用户ID非法
        /// </summary>
        public const int InvalidUserId = -100;

        /// <summary>
        /// 验证次数已用完
        /// </summary>
        public const int VerifyCountUsedUp = 0;

        /// <summary>
        /// 请求成功
        /// </summary>
        public const string Success = "200";

        /// <summary>
        /// 此用户未设置过安全问题
        /// </summary>
        public const string UserHasNotSetSecurityQuestion = "400";

        /// <summary>
        /// 出现异常
        /// </summary>
        public const string Exception = "500";
    }
    
    /// <summary>
    /// 验证用户安全问题的返回码
    /// </summary>
    public class VerifySecurityQuestionResponseCode
    {
        /// <summary>
        /// 用户安全问题ID非法
        /// </summary>
        public const int InvalidUserQuestionId = -200;

        /// <summary>
        /// 用户问题答案不能为空
        /// </summary>
        public const int NullQuestionAnswer = -300;

        /// <summary>
        /// 验证用户安全问题失败（答案错误）
        /// </summary>
        public const string WrongAnswer = "100";

        /// <summary>
        /// 用户没有设置过此安全问题
        /// </summary>
        public const string WrongUserQuestionId = "300";
    }

    /// <summary>
    /// 获取已设置的安全问题（单个，For验证）的返回码
    /// </summary>
    public class GetUserSecurityQuestionResponseCode
    {
        /// <summary>
        /// 无可用的用户安全问题, 当天已验证过（通过或不通过）所有的用户安全问题
        /// </summary>
        public const string CanNotFindAvailableUserSecurityQuestion = "600";
    }

    /// <summary>
    /// 设置安全问题的返回码
    /// </summary>
    public class SetSecurityQuestionResponseCode
    {
        /// <summary>
        /// 用户ID非法
        /// </summary>
        public const string InvalidUserId = "-100";

        /// <summary>
        /// 安全问题个数不对
        /// </summary>
        public const string InvalidSecurityQuestionCount = "-200";

        /// <summary>
        /// 非法的问题ID（问题ID在问题库中不存在、获取问题库出现异常）
        /// </summary>
        public const string InvalidQuestionId = "-300";

        /// <summary>
        /// 设置安全问题失败（更新数据库失败）
        /// </summary>
        public const string SaveToDBError = "100";
    }
}
